package com.example.sandbox.controller.order.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Digits;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * @Author Lierbao
 * @Date 2024/6/14 11:05
 */

@Data
@ApiModel("巴西支付下单请求")
public class Brazil58OrderRequest extends DownStream58AbstractMchAppRQ {

    @NotBlank(message = "clientRequestId number cannot be empty") // 商户订单号 不能为空
    @Size(min = 1, max = 35, message = "The length of the clientRequestId number is 1-35") // 商户订单号长度为 20～30
    @ApiModelProperty("商户订单号")
    private String clientRequestId;

    @NotBlank(message = "The payment amount cannot be empty") // 支付金额 不能为空
    @Min(value = 0, message = "Minimum amount 0") // 金额最小0
    @Digits(integer = 10, fraction = 2,
            message = "The upper limit of integers is 10 digits, and the upper limit of decimals is 2 digits")
    // 整数上限为10位，小数上限位2位
    @ApiModelProperty("支付金额")
    private String amount;

    @NotBlank(message = "The product subject cannot be empty") // 商品标题 不能为空
    @ApiModelProperty("商品标题")
    private String subject;

    @NotBlank(message = "The product description cannot be empty") // 商品描述 不能为空
    @ApiModelProperty("商品描述")
    private String body;

    @ApiModelProperty("异步通知地址 支付结果异步回调URL,只有传了该值才会发起回调")
    private String notifyUrl;

    /**
     * 姓名
     */
//    @NotBlank(message = "payerName cannot be empty")
    @ApiModelProperty("payerName")
    private String payerName;

    /**
     * CPF 号
     */
//    @NotBlank(message = "payerCPF cannot be empty")
    @ApiModelProperty("Payer's CPF ")
    private String payerCPF;

    /**
     * 暂保留, 不使用
     */
    @ApiModelProperty("是否需要扩展参数")
    private Integer needExtParam;


}
